import sys

import serial

sys.path.append(r"C:\_AAA\BlueNet\GK2020\design\communication\python")
from communication import Communication


ser = serial.Serial('com3')
ser.baudrate = 115200
ser.timeout = 0.01

comm = Communication(ser)


def do_read():
    while True:
        data = comm.read_data()
        if data is not None:
            print("received | label: {} | values: {}".format(data.label, data.values))


def do_write():
    pass


if __name__ == '__main__':
    do_read()